import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_excel('某公司各部门1—2月份实际支出1.xlsx')
x = df['部门']
height = df['1月']
plt.figure(figure=(8,4))
plt.rcParams['font.sans-serif']='SimHei'
plt.ylabel('实际支出（元）')
for a,b in zip(x,height):
    plt.text(a,b,'%d' %b,ha = 'center')
plt.bar(x,height,0.5,color='teal')
plt.legend(('1月',))
plt.show()